﻿@model Pr0ject0.Models.QuestionModel

@{
    ViewBag.Title = "CreateQuestionnaire";
    ViewDataDictionary dic = new ViewDataDictionary();
    dic["types"] = ViewBag.types;
    IEnumerable<Pr0ject0.Models.QuestionModel> qList = ViewBag.questionnaire;
}

<h2>CreateQuestionnaire</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>QuestionModel</legend>

        @Html.HiddenFor(model => model.id)

        <div class="editor-label">
            @Html.LabelFor(model => model.question)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.question)
            @Html.ValidationMessageFor(model => model.question)
        </div>

        <div class="editor-field">
            <p> type <br />
            @Html.DropDownListFor(model => model.type, new SelectList(ViewBag.types, "Value", "Key"))</p>
        </div>

        @Html.HiddenFor(model => model.title)

        <p>
            <input type="submit" value="Save" />
        </p>

        <p>
            <button type="submit" value="Done" formaction="/StaffingExpert/Done">Done</button>
        </p>


    </fieldset>
}
@Html.Partial("~\\Views\\Shared\\_PartialQuestionList.cshtml", qList, dic)
<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
